<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>活动详情</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css-v=3.3.5.css"
          rel="stylesheet">
    <link href="css/font-awesome.min.css-v=4.4.0.css"
          rel="stylesheet">
    <link href="css/plugins/iCheck/custom.css"
          rel="stylesheet">
    <link href="css/animate.min.css"
          rel="stylesheet">
    <link href="css/style.min.css-v=4.0.0.css"
          rel="stylesheet">
    <!--    <base target="_blank">-->
    <link rel="stylesheet" type="text/css" href="css/layui.css"/>
    <style>
        #zhuti {
            height: 100%;

        }

        #xiaohuiid {
            border-top: 0;
            padding-left: 20px;
            height: 360px;
            background-color: #fff;
            margin-right: -15px;
            margin-left: -15px;
        }
    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">

    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins" id="zhuti">

                <div class="ibox-title">
                    <h3 style="font-weight: 600;margin-top: 0;">活动详情</h3>
                </div>

                <div class="ibox-content">
                    <div method="post" id="bigform" autocomplete="off" class="form-horizontal">
                        <!--                        第一行-->
                        <div class="form-group" style="margin-bottom: 0px;">
                            <label class="col-sm-2 control-label">活动名称</label>
                            <div class="col-sm-3">
                                <input id="activityname" type="text" name="activityname" required placeholder=""
                                       class="form-control">
                            </div>
                            <label class="col-sm-2 control-label">活动方</label>
                            <div class="col-sm-3">
                                <input id="borrower" type="text" name="borrower" required placeholder=""
                                       class="form-control">
                            </div>
                        </div>
                        <br>
                        <!--                        第二行-->
                        <div class="form-group" style="margin-bottom: 0px;">
                            <label class="col-sm-2 control-label">登记人</label>
                            <div class="col-sm-3">
                                <input id="handler" type="text" name="handler" required placeholder=""
                                       class="form-control">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-bottom: 0px;">
                            <label class="col-sm-2 control-label" id='shifou1'>物品是否损坏</label>
                            <div class="col-sm-3"id="before_is_damage1">
                                <input id="before_is_damage" type="text" name="before_is_damage" required placeholder=""
                                       class="form-control">
                            </div>
                            <label class="col-sm-2 control-label" id='qingkuang1'>损坏情况</label>
                            <div class="col-sm-3" id="before_damage_details1">
                                <input id="before_damage_details" type="text" name="before_damage_details" required placeholder=""
                                       class="form-control">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <!--                        第三行-->
                        <div class="form-group" id="laydate">
                            <label class="col-sm-2 control-label">开始时间</label>
                            <div class="col-sm-3">
                                <input type="text" name="borrowingdate" required placeholder=""
                                       class="form-control" id="borrowingdate" disabled>
                            </div>
                            <label class="col-sm-2 control-label">结束时间</label>
                            <div class="col-sm-3">
                                <input type="text" name="returndate" required placeholder=""
                                       class="form-control" id="returrndate" disabled>
                            </div>
                        </div>
                        <!--                        第四行-->
                        <div class="form-group" style="margin-bottom: 0px;">
                            <label class="col-sm-2 control-label">借用物品</label>
                            <div class="col-sm-3">
                                <input id="borrowedsign" type="text" name="borrowedsign" required
                                       placeholder=""
                                       class="form-control">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <!--                        第五行-->
                        <div class="form-group" style="margin-bottom: 0px;">
                            <label class="col-sm-2 control-label">取走人</label>
                            <div class="col-sm-3">
                                <input id="organizer" type="text" name="organizer" required placeholder=""
                                       class="form-control">
                            </div>
                            <label class="col-sm-2 control-label">联系电话</label>
                            <div class="col-sm-3">
                                <input id="organizer_phone" type="text" name="organizer_phone" required placeholder=""
                                       class="form-control">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-bottom: 0px;">
                            <label class="col-sm-2 control-label">取走人学号</label>
                            <div class="col-sm-3">
                                <input id="organizer_card" type="text" name="organizer_card" required
                                       placeholder=""
                                       class="form-control">
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>

                        <div class="form-group" style="margin-bottom: 0px;">
                            <label class="col-sm-2 control-label">归还人</label>
                            <div class="col-sm-3">
                                <input id="returner" type="text" name="returner" required placeholder=""
                                       class="form-control">
                            </div>
                            <label class="col-sm-2 control-label">联系电话</label>
                            <div class="col-sm-3">
                                <input id="returner_phone" type="text" name="returner_phone" required placeholder=""
                                       class="form-control">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-bottom: 0px;">
                            <label class="col-sm-2 control-label">归还人学号</label>
                            <div class="col-sm-3">
                                <input id="returner_card" type="text" name="returner_card" required
                                       placeholder=""
                                       class="form-control">
                            </div>
                            <label class="col-sm-2 control-label">值班人员</label>
                            <div class="col-sm-3">
                                <input id="zhibanren" type="text" name="zhibanren" required placeholder=""
                                       class="form-control">
                            </div>
                        </div>
                        <br>
                        <div class="form-group" style="margin-bottom: 0px;">
                            <label class="col-sm-2 control-label"id='shifou2'>物品是否损坏</label>
                            <div class="col-sm-3"id="is_damage1">
                                <input id="is_damage" type="text" name="is_damage" required placeholder=""
                                       class="form-control">
                            </div>
                            <label class="col-sm-2 control-label"id='qingkuang2'>损坏情况</label>
                            <div class="col-sm-3"id="after_damage_details1">
                                <input id="after_damage_details" type="text" name="after_damage_details" required placeholder=""
                                       class="form-control">
                            </div>
                        </div>


                        <div class="hr-line-dashed"></div>
                        <div class="form-group" id="tjj">
                        </div>


                        <!--  返回功能-->
                        <div class="form-group">
                            <div class="col-sm-3 col-sm-offset-4">
                                <a target="_self" href="RootmeetingState.html">
                                    <input type="submit"
                                           class="btn btn-info"
                                           value="返回">
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

                <script src="layui/layui.js" type="text/javascript" charset="utf-8"></script>
                <script src="js/jquery.min.js-v=2.1.4"
                ></script>
                <script src="layui/layer/layer.js" type="text/javascript" charset="utf-8"></script>
                <script>


                    //-----jquery框架-----
                    let id = 0;
                    let state = "";

                    <!--取url后边的参数-->
                    function GetRequest() {
                        const url = location.search; //获取url中"?"符后的字串
                        let theRequest = new Object();
                        if (url.indexOf("?") != -1)//判断不等于空
                        {
                            let str = url.substr(1);//抽取字符
                            let strs = str.split("&");//抽取从&开始的
                            for (let i = 0; i < strs.length; i++) {
                                theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
                            }
                        }
                        return theRequest;
                    }

                    $(document).ready(function ab() {
                        let x = GetRequest();
                        // console.log(x);
                        let idd = x.id;
                        id = idd;
                        $(".i-checks").iCheck({
                            checkboxClass: "icheckbox_square-green",
                            radioClass: "iradio_square-green",
                        });
                        // console.log(parseInt(idd))

                        //所有输入框只读*****
                        $("#bigform").attr('disabled', true)
                        $("input").attr("readonly", "readonly")

                        //----获取活动---
                        $.ajax({
                            type: "GET",
                            url: "/findById",
                            data: {
                                id: parseInt(idd)
                            },
                            success: function (msg) {
                                console.log(msg);
                                state = msg.state;
                                $("#activityname").val(msg.activityname);
                                $('#borrower').val(msg.borrower);
                                $('#handler').val(msg.handler);
                                $('#borrowingdate').val(msg.borrowingdate);
                                $('#returrndate').val(msg.returndate);
                                $('#borrowedsign').val(msg.borrowedsign);
                                $('#organizer').val(msg.organizer);
                                $('#organizer_phone').val(msg.organizer_phone);
                                $('#organizer_card').val(msg.organizer_card);
                                $('#returner').val(msg.returner);
                                $('#returner_card').val(msg.returner_card);
                                $('#returner_phone').val(msg.returner_phone);
                                $('#zhibanren').val(msg.zhibanren);
                                $('#before_is_damage').val(msg.before_is_damage);
                                $('#before_damage_details').val(msg.before_damage_details);
                                $('#is_damage').val(msg.is_damage);
                                $('#after_damage_details').val(msg.after_damage_details);

                                if(msg.before_is_damage=="否") {
                                    document.getElementById('before_damage_details1').style.display = 'none';
                                    document.getElementById('qingkuang1').style.display = 'none';
                                }
                                if(msg.before_is_damage=="是") {
                                    document.getElementById('before_is_damage1').style.display = 'none';
                                    document.getElementById('shifou1').style.display = 'none';

                                }
                                if(msg.is_damage=="否") {
                                    document.getElementById('after_damage_details1').style.display = 'none';
                                    document.getElementById('qingkuang2').style.display = 'none';
                                }
                                if(msg.is_damage=="是") {
                                    document.getElementById('is_damage1').style.display = 'none';
                                    document.getElementById('shifou2').style.display = 'none';

                                }

                            }
                        });
                        //----结束---
                    });

                </script>
                <script src="js/bootstrap.min.js-v=3.3.5"
                ></script>
                <script src="js/content.min.js-v=1.0.0"
                ></script>
                <script src="js/plugins/iCheck/icheck.min.js"
                ></script>
                <script type="text/javascript" src="../../../tajs.qq.com/stats-sId=9051096"
                        tppabs="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>

</body>
</html>
